package com.clusterswisdom.horn.api.ioc.struct;

import java.util.HashMap;
import java.util.Map;

public class StructContainer {
	
	private Map<String, StructConfig> configMap = new HashMap<String, StructConfig>();

	private static StructContainer container = new StructContainer();
	
	public static StructContainer getContainer() {
		return container;
	}
	
	public void addStruct(StructConfig config) {
		configMap.put(config.getName(), config);
	}
	
	public StructConfig getStruct(String name) {
		if (name == null) {
			return null;
		}
		
		return configMap.get(name);
	}
}